#pragma once

#include <linux/kernel.h>
#include <linux/cpumask_types.h>
#include <linux/bitmap.h>

#define for_each_possible_cpu(cpu) for ((cpu) = 0; (cpu) < 1; (cpu)++)



void set_cpu_possible(unsigned int cpu, bool possible);

struct cpumask *cpu_present_mask(void);

/**
 * for_each_cpu - iterate over every cpu in a mask
 * @cpu: the (optionally unsigned) integer iterator
 * @mask: the cpumask pointer
 *
 * After the loop, cpu is >= nr_cpu_ids.
 */
#define for_each_cpu(cpu, mask) \
    for_each_set_bit(cpu, cpumask_bits(mask), NR_CPUS)

#if NR_CPUS > 1
bool cpu_online(unsigned int cpu);
#else
static inline bool cpu_online(unsigned int cpu)
{
	return cpu == 0;
}

#endif
